package com.alter.model;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 个人文章分类
 * 
 * @author a_alter
 */
@Table(name = "AF_ARTICLE_TYPE")
@Entity
public class AfPersonalArticleType extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ManyToOne
    @JoinColumn(name = "user_aid", nullable = false)
    private SeUser user;

    @Column
    private String name;

    @Column
    private String description;

    @OneToMany(mappedBy = "type")
    private List<AfArticle> articles;

    public SeUser getUser() {
	return user;
    }

    public void setUser(SeUser user) {
	this.user = user;
    }

    public String getName() {
	return name;
    }

    public void setName(String name) {
	this.name = name;
    }

    public String getDescription() {
	return description;
    }

    public void setDescription(String description) {
	this.description = description;
    }

    public List<AfArticle> getArticles() {
	return articles;
    }

    public void setArticles(List<AfArticle> articles) {
	this.articles = articles;
    }

}
